package object2;

import java.util.Scanner;

/**
 * @Author:CJJ
 * @Date:2025/4/28
 * 测试用户登录
 */
public class Test2 {
    public static void main(String[] args) {
        String username="admin";
        String password="123456";

        Scanner sc = new Scanner(System.in);

        System.out.println("请输入用户名：");
        String uname = sc.nextLine();

        System.out.println("请输入密码：");
        String pwd = sc.nextLine();

        if(uname.equals(username) && password.equals(pwd)){
            System.out.println("登录成功");
        }else{
            System.out.println("登录失败");
        }
    }
}
